﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;

namespace Homebound
{
    class ControlsState : State
    {
        SpriteFont font;
        SpriteFont titleFont;
        Dictionary<string, string> controls;
        

        public ControlsState(SpriteFont newFont, SpriteFont newTitleFont, GraphicsDeviceManager newGraphics, GameServiceContainer newServices, ContentManager newContent)
            : base(newGraphics, newServices, newContent)
        {
            font = newFont;
            titleFont = newTitleFont;

            controls = new Dictionary<string, string>();
            controls.Add("Jump", "<Space>");
            controls.Add("Sprint", "<Shift>");

        }

        // Called whenever a new state is selected.
        public override void onEnter(State state)
        {
            base.onEnter(state);
        }

        // Called when the state is changing.
        public override void onExit(State state)
        {
            base.onExit(state);
        }

        // Draw the visual representation of the state.
        public override void draw(SpriteBatch spriteBatch, GameTime gameTime, Vector2 screenSize)
        {
            spriteBatch.Begin();
                spriteBatch.DrawString(titleFont, "CONTROLS", new Vector2(screenSize.X / 2, screenSize.Y / 2), Color.White);
            spriteBatch.End();
            base.draw(spriteBatch, gameTime, screenSize);
        }

        // Handles all input for the current state, (Keyboard, GamePad).
        public override void input(GameTime gameTime, List<Keys> keys, GamePadButtons buttons, GamePadDPad dpad, GamePadThumbSticks thumbSticks)
        {
            base.input(gameTime, keys, buttons, dpad, thumbSticks);
        }

        // Handles all update operations for the current state, (Keyboard, GamePad).
        public override void update(GameTime gameTime)
        {
            base.update(gameTime);
        }

        // Conditions necessary to enter to go a following state.
        public override bool goingForward(State prev)
        {
            return true;
        }
    }
}
